<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/WEB-INF/views/include/taglib.jsp"%>   
<!DOCTYPE html>
	<head>
	<script src="${ctxWebStatic }/laydate/laydate.js"></script>
	<meta name="decorator" content="center_common" />
	<script>
	$(function(){
		$('#test6').focus(function(){
		  	$(this).val();
		  });
		laydate.render({
		  elem: '#test6',
		  //value:'2017-12-06 - 2017-12-07',
		  format:'yyyy-MM-dd',
		  range: true,
		  done: function(value, date, endDate){
				 $("#test6").val(value);
				  																																																																																		
			}
		}); 
	})
	
	$(function(){
		var status=$("#status").val();
		var code=$("#code").val();
		var createDate=$("#createDate").val();
		
		if($.trim(createDate).length>0){
			$("#test6").val(createDate);
		}
		
		if($.trim(status).length>0){
			$("#useStatus option").each(function(){
				if($(this).val()==status){
					$(this).attr("selected","selected");
				}
			})
		}
		
		if($.trim(code).length>0){
			$("#useCode").val(code);
		}
		
	})
	
	function selectEnquire(){
		$("#forms").submit();
	}
    </script>
  
	</head>
	<body>
	
	<input id="createDate"  value="${createDate }" type="hidden" />
	<input id="status" value="${status}" type="hidden" />
	<input id="code" value="${code}" type="hidden" />
	<!--4line结束-->
	<!--主题内容-->
	<div class="parts_main_box bgf5">
		<div class="container">
			<div class="row">
				<!-- pc 订单管理 -->
				<div class="Credit_box clearfix">
					<!-- 左边部分 -->
					
					<!-- 左边部分 end-->
					<!-- 右边部分 -->
					<div class="col-sm-10 pad20 pad_10">
						<div class="Credit_right">
							<!--快速下单-->
							<div class="goods_detail_info_box mar_16 clearfix">
								<h3>
									<span>我的询价单</span>
									<!--<a href="javascript:void(0)" class="add_address">+新增</a>-->
								</h3>
								<div class="inquiry_box">
									<div class="Transaction_title clearfix">
									  <form action="${ctxWeb}/enquire/myEnquireList" method="post" id="forms" >
										<p class="col-sm-7 Transaction_time pad_r0">
											<label>询价日期：</label>
											<input type="text" class="demo-input hy" id="test6" name="createDate1">
										</p>
										<p class="col-sm-5 Transaction_type pad_r0">
											<label>询价状态：</label>
											<select class="hy" name="status" id="useStatus">
											    <option value="">所有类型</option>
												<option value="1">未回复</option>
												<option value="2">部分回复</option>
												<option value="3">全部回复</option>
											</select>
										</p>
										<p class="col-sm-7 Transaction_time pad_r0">
											<label>询价单号：</label>
											<input type="number" class="demo-input" id="useCode" name="code">
										</p>
										</form>
										<p class="col-sm-5 Transaction_time pad_r0">
											<button class="search_button" id="selectEnquire" onclick="selectEnquire()">搜索</button>
										</p>
									</div>
									
								</div>
								<!--快速下单表格-->
								<div class="our_adress_box">
									
									<div class="our_adress_table  clearfix">
										<table class="table table-bordered">
										    <thead>
											    <tr>
											        <th>询价单号</th>
											        <th>询价日期</th>
											        <th>联系人</th>
											        <th>联系电话</th>
											        <th>状态</th>
											        <th>操作</th>
											    </tr>
										    </thead>
										    <tbody>
										       <c:forEach var="list" items="${list }">
											    <tr>
											        <td>${list.code}</td>
											        <td><fmt:formatDate value="${list.createDate}" pattern="yyyy-MM-dd HH:mm"/></td>
											        <td>${list.contacts }</td>
											        <td>${list.phone }</td>
											        <td class="color_red  js_set">${fns:getDictLabel(list.status, 'reply_status', '')}</td>
											        <td class="color_blue">
											        	<a href="${ctxWeb}/enquire/receipeDetail?code=${list.code}">查看</a>   
											        </td>
											    </tr>
											    </c:forEach>
										    </tbody>
										</table>
										
									</div>
								</div>
								<!--快速下单表格结束-->
							</div>	
							<!--快速下单结束-->
							
						</div>
					</div>
					<!-- 右边部分 end-->
				</div>
				<!-- pc 订单管理 end -->
			</div>
		</div>
	</div>
	<!--主题内容-->
	<!--foot-->
	</body>
</html>
